package com.wgy.day3;

/**
 * Created by pc on 2020/11/3 21:49
 * Description: Demo1
 */
public class Demo02MethodDefine {
    public static void main(String[] args) {
        sum(10,20);//单独调用

        System.out.println(sum(10,20));//打印调用
        System.out.println("===========");
        int number=sum(15,20);//赋值调用
        System.out.println(number);

    }

    public static int sum(int a, int b) {

        int result = a + b;
        return result;
    }

}
